/* @flow */

import React, { Component } from 'react';
import {
  View,
  Text,
  StyleSheet,
  Button,
  Image,
  TouchableOpacity,
  TextInput,
} from 'react-native';

var Dimensions = require('Dimensions');

var {width} = Dimensions.get('window');
var {height} = Dimensions.get('window');


export default class PostEditView extends Component {

  static navigationOptions = ({navigation,screenProps}) => {
    return {
      header: <View style={styles.headerViewStyle}>

                <TouchableOpacity onPress = {() =>
                  navigation.goBack()}>
                  <Image style={{width:22,height:22,marginLeft:10,marginTop:20}}
                    source={require('../../img/communityImg/cross1.png')}>
                  </Image>
                </TouchableOpacity>

                <Text style={{marginLeft:130,marginTop:23}}>{'发表话题'}</Text>

                <Image style={{width:22,height:22,marginLeft:125,marginTop:20}}
                  source={require('../../img/communityImg/tick.png')}>
                </Image>

              </View>
    }
  }


  render() {
    return (
      <View style={styles.container}>
        <TextInput
          style={{marginTop:10,marginLeft:5}}
          placeholder={'标题(30个字内)'}
          maxLength={30}
          autoFocus={true}>
        </TextInput>

        <View style={{height:1,width:width,backgroundColor:'lightgray',marginTop:20}}>

        </View>

        <TextInput
          style={{marginTop:25,marginLeft:5}}
          placeholder={'此时此刻你想说的是(1000字内)'}
          maxLength={1000}>
        </TextInput>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    height:height-55,
    flex: 1,
    backgroundColor:'white'
  },
  headerViewStyle:{
    flexDirection:'row',
    height:55,
    width:width,
    backgroundColor:'white',
    // flex:1,
  }
});
